import axios from 'axios'
import {HeadURL} from './mofa'
import store from '../store/index'

let inObj=axios.create({
    baseURL:HeadURL ,
    timeout: 10000
})

export default async function request(comgin){
   return inObj.request(comgin).then(res=>{
       return res
   }).catch(res=>{
       if(res){
        store.state.commit('mistake')
       }
   })

}